<template>
	<view class="page" :style="themeColor">
		<view class="flex benben-position-layout flex flex-wrap align-center cardAndSafe_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub cardAndSafe_fd0_0'>
				<view class='flex flex-wrap align-center'>
					<person></person>
				</view>
				<view class='flex flex-wrap align-stretch justify-center flex-sub'>
					<text class='cardAndSafe_fd0_0_c1_c0'>我的</text>
				</view>
				<view class='flex flex-wrap align-center cardAndSafe_fd0_0_c2'>
				</view>
			</view>
		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

		<view class="info">
			<view class="info_item">
				<view class="item_info" @tap.stop="openContent(1)">
					<view class="">我的个人资料</view>
					<image v-if="content_id != 1" :src='STATIC_URL+"91.png"' mode="aspectFill"></image>
					<image v-else class="open" :src='STATIC_URL+"92.png"' mode="aspectFill"></image>
				</view>
				<template v-if="content_id == 1">
					<view class="informationInfo">
						<template>
							<view class="informationInfo_item" @tap.stop="selectInformation(1)">
								<view class="">个人传记</view>
								<image v-if="is_biography == 1" :src='STATIC_URL+"1.png"' mode="aspectFill"></image>
							</view>
							<template v-if="information_id == 1">
								<view class="jiben">
									<view class="jiben_title">基本资料</view>
									<view class="jiben_item_1">
										<view class="jiben_item_1_le">我是</view>
										<view class="jiben_item_1_ri">
											<view class="jiben_item_select" v-for="(v, k) in sex_option" :key="k"
												@tap.stop="selectSex(v.value)">
												<image v-if="usefInfo.sex == v.value" :src='STATIC_URL+"1.png"'
													mode="aspectFill"></image>
												<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
												<text>{{v.label}}</text>
											</view>
										</view>
									</view>
									<view class="jiben_item_1">
										<view class="jiben_item_1_le">性取向</view>
										<view class="jiben_item_1_ri">
											<view class="jiben_item_select" v-for="(v, k) in sexual_orientation_option"
												:key="k" @tap.stop="selectSexual(v.value)">
												<image v-if="usefInfo.sexual_orientation == v.value"
													:src='STATIC_URL+"1.png"' mode="aspectFill"></image>
												<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
												<text>{{v.label}}</text>
											</view>
										</view>
									</view>
									<view class="jiben_item_1">
										<view class="jiben_item_1_le">我的兴趣见面</view>
										<view class="jiben_item_1_ri">
											<view class="jiben_item_select" v-for="(v, k) in interest_meet_option"
												:key="k" @tap.stop="selectMeet(v.value)">
												<image v-if="usefInfo.interest_meet == v.value"
													:src='STATIC_URL+"1.png"' mode="aspectFill"></image>
												<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
												<text>{{v.label}}</text>
											</view>
										</view>
									</view>
									<view class="jiben_item_2">
										<view class="jiben_item_2_le">显示名称</view>
										<view class="jiben_item_2_ri">
											<input v-model="usefInfo.user_nickname" placeholder="请输入"
												placeholder-style="color: #bfbfbf;font-size:28rpx;" type="text"
												maxlength="14">
										</view>
									</view>
									<view class="jiben_item_2" @tap.stop="pickerDiy1681180677013=true">
										<view class="jiben_item_2_le">出生日期</view>
										<view class="jiben_item_2_ri">
											<input v-model="usefInfo.birthday" type="text" :disabled="true"
												placeholder="请选择" placeholder-style="color: #bfbfbf;font-size:28rpx;">
											<u-icon name="arrow-down" color="#bfbfbf"></u-icon>
										</view>
									</view>
									<view class="jiben_item_2">
										<view class="jiben_item_2_le">肤色</view>
										<view class="jiben_item_2_ri">
											<zxz-uni-data-select :placeholder="'选择肤色'" v-model="usefInfo.skin_color"
												:localdata="skin_color_option" dataKey="label" dataValue="value"
												@change="selectSkinColor"></zxz-uni-data-select>
										</view>
									</view>
									<view class="jiben_item_2">
										<view class="jiben_item_2_le">国籍</view>
										<view class="jiben_item_2_ri">
											<zxz-uni-data-select :placeholder="'选择国籍'" v-model="usefInfo.nationality"
												:localdata="nationality_option" dataKey="label" dataValue="value"
												@change="selectCountry"></zxz-uni-data-select>
										</view>
									</view>
									<view class="jiben_title">形象外观</view>
									<!-- <view class="jiben_item_1">
										<view class="jiben_item_1_le">头发</view>
										<view class="jiben_item_1_ri">
											<view class="jiben_item_select" v-for="(v, k) in hair_option" :key="k" @tap.stop="selectHair(v.value)">
												<image v-if="usefInfo.hair == v.value" :src='STATIC_URL+"1.png"' mode="aspectFill"></image>
												<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
												<text>{{v.label}}</text>
											</view>
										</view>
										
									</view>
									<view class="jiben_item_1">
										<view class="jiben_item_1_le">眼睛</view>
										<view class="jiben_item_1_ri">
											<view class="jiben_item_select" v-for="(v, k) in eye_option" :key="k" @tap.stop="selectEye(v.value)">
												<image v-if="usefInfo.eye == v.value" :src='STATIC_URL+"1.png"' mode="aspectFill"></image>
												<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
												<text>{{v.label}}</text>
											</view>
										</view>
									</view> -->
									<view class="jiben_item_2">
										<view class="jiben_item_2_le">身高</view>
										<view class="jiben_item_2_ri">
											<zxz-uni-data-select :placeholder="'选择身高'" v-model="usefInfo.height"
												:localdata="height_option" dataKey="label" dataValue="value"
												@change="selectHeight"></zxz-uni-data-select>
										</view>
									</view>
									<view class="jiben_item_2">
										<view class="jiben_item_2_le">体重</view>
										<view class="jiben_item_2_ri">
											<zxz-uni-data-select :placeholder="'选择体重'" v-model="usefInfo.weight"
												:localdata="weight_option" dataKey="label" dataValue="value"
												@change="selectWeight"></zxz-uni-data-select>
										</view>
									</view>
									<view class="jiben_item_2">
										<view class="jiben_item_2_le">胸围</view>
										<view class="jiben_item_2_ri">
											<zxz-uni-data-select :placeholder="'选择胸围'" v-model="usefInfo.bust"
												:localdata="bust_option" dataKey="label" dataValue="value"
												@change="selectBust"></zxz-uni-data-select>
										</view>
									</view>
									<!-- <view class="jiben_item_1">
										<view class="jiben_item_1_le">脱毛</view>
										<view class="jiben_item_1_ri">
											<view class="jiben_item_select" v-for="(v, k) in molt_option" :key="k" @tap.stop="selectMolt(v.value)">
												<image v-if="usefInfo.molt == v.value" :src='STATIC_URL+"1.png"' mode="aspectFill"></image>
												<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
												<text>{{v.label}}</text>
											</view>
										</view>
									</view> -->

									<view class="btn">
										<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
										<view class="btn_2" @tap.stop="saveBiography">确定</view>
									</view>
								</view>
							</template>
							<view class="informationInfo_item" @tap.stop="selectInformation(2)">
								<view class="">个人简介</view>
							</view>
							<template v-if="information_id == 2">
								<view class="jiben_title" style="margin-bottom: 24rpx;">我的独白</view>
								<view class="html_content">
									<textarea class="html_content_text" maxlength="120" placeholder="请输入"
										placeholder-style="color: #bfbfbf;font-size:28rpx;"
										v-model="introduction"></textarea>
								</view>
								<view class="jiben_title">其他信息</view>

								<view class="jiben_item_4">
									<view class="jiben_item_4_le">抽烟</view>
									<view class="jiben_item_4_ri">
										<view class="jiben_item_select" v-for="(v, k) in smoke_option" :key="k"
											@tap.stop="selectSmoke(v.value)">
											<image v-if="usefInfo.smoke == v.value" :src='STATIC_URL+"1.png"'
												mode="aspectFill"></image>
											<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
											<text>{{v.label}}</text>
										</view>
									</view>
								</view>
								<view class="jiben_item_4">
									<view class="jiben_item_4_le">喝酒</view>
									<view class="jiben_item_4_ri">
										<view class="jiben_item_select" v-for="(v, k) in drink_option" :key="k"
											@tap.stop="selectDrink(v.value)">
											<image v-if="usefInfo.drink == v.value" :src='STATIC_URL+"1.png"'
												mode="aspectFill"></image>
											<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
											<text>{{v.label}}</text>
										</view>
									</view>
								</view>

								<view class="btn">
									<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
									<view class="btn_2" @tap.stop="saveIntroduction">确定</view>
								</view>
							</template>
							<view class="informationInfo_item" @tap.stop="selectInformation(3)">
								<view class="">语言</view>
								<!-- <image v-if="lang_info.length > 0" :src='STATIC_URL+"1.png"' mode="aspectFill"></image> -->

							</view>
							<template v-if="information_id == 3">
								<view class="language_info">
									<view class="language_select">
										<zxz-uni-data-select :placeholder="'选择语言'" v-model="selectedLanguage"
											:localdata="lang_option" dataKey="label" dataValue="value"
											@change="selectLang"></zxz-uni-data-select>
									</view>
									<view class="language_add" @tap.stop="addLang">
										<text>+</text>
										<text>添加</text>
									</view>
								</view>
								<view class="language_list">
									<view class="language_item" v-for="(item, index) in lang_info" :key="index">
										<view class="language_item_1">{{item.lang}}</view>
										<view class="language_item_2" @tap.stop="selectLangIndex(index)">
											<zxz-uni-data-select :placeholder="'请选择'" v-model="item.level"
												:localdata="lang_level_option" dataKey="label" dataValue="value"
												@change="selectLangLevel"></zxz-uni-data-select>
										</view>
										<view class="language_item_3" @tap.stop="closeLang(index)">
											<image :src='STATIC_URL+"110.png"' mode="aspectFill"></image>
										</view>
									</view>
								</view>
								<view class="btn">
									<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
									<view class="btn_2" @tap.stop="saveLang">确定</view>
								</view>
							</template>
							<view class="informationInfo_item" @tap.stop="selectInformation(4)">
								<view class="">城市</view>
								<!-- <image v-if="city_info.length > 0" :src='STATIC_URL+"1.png"' mode="aspectFill"></image> -->
							</view>
							<template v-if="information_id == 4">
								<view class="jiben_title" style="margin-bottom: 32rpx;">所在城市</view>
								<view class="language_info">
									<view class="language_select">
										<zxz-uni-data-select :placeholder="'选择国家'" v-model="country_name"
											:localdata="nationalityList" dataKey="label" dataValue="value"
											@change="workCountry"></zxz-uni-data-select>
									</view>
									<view class="language_add" @tap.stop="addCountry">
										<text>+</text>
										<text>添加</text>
									</view>
								</view>
								<view class="language_list">
									<view class="language_item" v-for="(item,index) in city_info" :key="index">
										<view class="language_item_1">{{item.country}}</view>
										<view class="language_item_5" @tap.stop="selectCityIndex(index)">
											<zxz-uni-data-select :placeholder="'选择城市'" v-model="item.city"
												:localdata="item.cityList" dataKey="label" dataValue="value"
												@change="workCity"></zxz-uni-data-select>
										</view>
										<view class="language_item_5" @tap.stop="selectAreaIndex(index)">
											<zxz-uni-data-select :placeholder="'选择区域'" v-model="item.area"
												:localdata="item.areaList" dataKey="label" dataValue="value"
												@change="workArea"></zxz-uni-data-select>
										</view>
										<view class="language_item_3" @tap.stop="closeCity(index)">
											<image :src='STATIC_URL+"110.png"' mode="aspectFill"></image>
										</view>
									</view>
								</view>
								<view class="btn">
									<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
									<view class="btn_2" @tap.stop="saveCity">确定</view>
								</view>
							</template>
							<view class="informationInfo_item" @tap.stop="selectInformation(5)">
								<view class="">时间</view>
							</view>
							<template v-if="information_id == 5">
								<view class="jiben_item_1" style="border-bottom: 0;">
									<!-- <view class="jiben_item_1_le">我是</view> -->
									<view class="jiben_item_1_ri" style="width: 100%;">
										<view class="jiben_item_select" v-for="(v, k) in time_option" :key="k"
											@tap.stop="selectTimeType(v.value)">
											<image v-if="usefInfo.time_info_type == v.value" :src='STATIC_URL+"1.png"'
												mode="aspectFill"></image>
											<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
											<text>{{v.label}}</text>
										</view>
									</view>
								</view>
								<template v-if="usefInfo.time_info_type == 2">
									<view class="language_info">
										<view class="language_select">
											<zxz-uni-data-select :placeholder="'选择时间'" v-model="selectedWeek"
												:localdata="week_option" dataKey="label" dataValue="value"
												@change="selectTime"></zxz-uni-data-select>
										</view>
										<view class="language_add" @tap.stop="addWeek">
											<text>+</text>
											<text>添加</text>
										</view>
									</view>
									<view class="language_list">
										<view class="language_item" v-for="(item, index) in time_info" :key="index">
											<view class="language_item_1">{{item.week}}</view>
											<view class="language_item_4" @tap.stop="selectWeekIndex(index)">
												<zxz-uni-data-select :placeholder="'请选择'" v-model="item.start_time"
													:localdata="hourList" dataKey="label" dataValue="value"
													@change="selectStartTime"></zxz-uni-data-select>
											</view>
											<view class="language_item_4" @tap.stop="selectWeekIndex(index)">
												<zxz-uni-data-select :placeholder="'请选择'" v-model="item.end_time"
													:localdata="hourList" dataKey="label" dataValue="value"
													@change="selectEndTime"></zxz-uni-data-select>
											</view>
											<view class="language_item_3" @tap.stop="closeWeek(index)">
												<image :src='STATIC_URL+"110.png"' mode="aspectFill"></image>
											</view>
										</view>
									</view>
								</template>
								
								<view class="btn">
									<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
									<view class="btn_2" @tap.stop="saveWeek">确定</view>
								</view>
							</template>
							<view class="informationInfo_item" @tap.stop="selectInformation(6)">
								<view class="">联系</view>
								<!-- <image v-if="usefInfo.mobile && usefInfo.wx" :src='STATIC_URL+"1.png"' mode="aspectFill"></image> -->
							</view>
							<template v-if="information_id == 6">
								<view class="lianxi">
									<view class="lianxi_item">
										<view class="lianxi_item_1">whatsapp</view>
										<view class="lianxi_item_2">
											<input v-model="usefInfo.whatsapp" placeholder="请输入" placeholder-style="color: #bfbfbf;font-size:28rpx;" type="number" maxlength="20">
										</view>
									</view>
									<view class="lianxi_item">
										<view class="lianxi_item_1">微信号</view>
										<view class="lianxi_item_2">
											<input v-model="usefInfo.wx" placeholder="请输入"
												placeholder-style="color: #bfbfbf;font-size:28rpx;" type="text"
												maxlength="20">
										</view>
									</view>
								</view>
								<view class="btn">
									<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
									<view class="btn_2" @tap.stop="saveLianxi">确定</view>
								</view>

							</template>
							<view class="informationInfo_item" @tap.stop="selectInformation(7)">
								<view class="">图库</view>
								<!-- <image v-if="imageData.length > 0" :src='STATIC_URL+"1.png"' mode="aspectFill"></image> -->
							</view>
							<template v-if="information_id == 7">
								<view class="jiben_title">个人图库（最少3张，最多可上传9张图片）</view>
								<view class="">
									<view class="image_tips">请注意，以下照片不符合上传要求：</view>
									<view class="image_tips_item">1、暴露隐私部位</view>
									<view class="image_tips_item">2、赤裸或仅穿着内衣</view>
									<view class="image_tips_item">3、在海滩或泳池以外的地方穿着泳衣或比基尼</view>
									<view class="image_tips_item">4、照片中出现床或按摩床</view>
								</view>
								<view class="images_list">
									<view class="images_list_item"  @tap.stop="selectCover(k)" v-for="(v, k) in imageData" :key="k">
										<view style="width: 200rpx;height: 206rpx;" :class="cover_img_index == k ? 'cover_active' : ''">
											<image :src='v' mode="aspectFill"></image>
										</view>
										<image @tap.stop="deleteImg(1, k)" class="deImg" :src='STATIC_URL+"34.png"' mode=""></image>
										<view v-if="cover_img_index == k" class="images_item_tips" @tap.stop="saveCoverImg(v)">设为主图</view>
										<view v-else style="background-color: #fff;" class="images_item_tips"></view>
									</view>
									<view class="images_list_item" @tap.stop="uploadIMG(1)" v-if="imageData.length < 9">
										<image :src='STATIC_URL+"48.jpg"' mode="aspectFill"></image>
									</view>
								</view>
								
								<view class="btn" style="padding: 0 0 32rpx;">
									<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
									<view class="btn_2" @tap.staop="saveImages">确定</view>
								</view>
							</template>
							<view class="informationInfo_item" @tap.stop="selectInformation(8)">
								<view class="">视频</view>
							</view>
							<template v-if="information_id == 8">
								<view class="jiben_title">视频（可上传1个展示视频）</view>
								<!-- <view class="images_list">
									<image :src='STATIC_URL+"111.png"' mode=""></image>
								</view> -->
								<view class="video_img">
									<view @tap.stop="uploadVideo(1)">
										<view class="video" v-if="videoSrc">
											<video :src="videoSrc"></video>
										</view>
										<view class="video_upload" v-if="!videoSrc">
											<image :src='STATIC_URL+"75.png"' mode="aspectFill"></image>
										</view>
									</view>
									<view class="video_image" @tap.stop="uploadVideoImg(1)">
										<image v-if="!videoImg" :src='STATIC_URL+"28.png"' mode="aspectFill"></image>
										<image class="video_image_icon" v-else :src='videoImg' mode="aspectFill">
										</image>
									</view>
								</view>
								<view class="btn">
									<view class="btn_1" @tap.stop="information_id = '0'">取消</view>
									<view class="btn_2" @tap.stop="saveVideo">确定</view>
								</view>
							</template>
						</template>

					</view>
				</template>
			</view>
		</view>

		<view class="info">
			<view class="info_item">
				<view class="item_info" @tap.stop="goAd">
					<view class="">发布</view>
					<u-icon name="arrow-right" color="#999" size="36"></u-icon>
				</view>
				<view v-if="tips_status">
					<view class="" style="margin-top: 24rpx;">
						<view class="image_tips" style="font-size: 28rpx;">提示：</view>
						<view class="image_tips_item" style="font-size: 25rpx;line-height: 34rpx;">
							要发布个人资料，您必须接受网站发布规则（不允许上传虚假数据或照片、未经授权使用的第三方照片或使用本人/他人个人资料或照片实施犯罪），违规将导致账号被冻结或删除。
						</view>
					</view>
					<view class="xieyi_info" @tap.stop="xieyi1 = !xieyi1">
						<image v-if="xieyi1" :src='STATIC_URL+"1.png"' mode=""></image>
						<image v-else :src='STATIC_URL+"51.png"' mode=""></image>
						<view style="padding-left: 8rpx;">
							<text>我已阅读并接受</text>
							<text @tap.stop="openXieyi(8)" style="color: #6A0002;">发布条款和条件</text>
						</view>
					</view>
					<view class="xieyi_info"  @tap.stop="xieyi2 = !xieyi2">
						<image v-if="xieyi2" style="transform: translateY(5rpx);" :src='STATIC_URL+"1.png"' mode=""></image>
						<image v-else style="transform: translateY(5rpx);" :src='STATIC_URL+"51.png"' mode=""></image>
						<!-- <text>我已阅读并接受</text> -->
						<view style="width: calc(100% - 50rpx);padding-left: 8rpx;">
							<text @tap.stop="openXieyi(9)">我声明我已达到法定年龄并符合在网站上发布个人资料的条件。我愿意接受</text>
							<text @tap.stop="openXieyi(9)" style="color: #6A0002;">网站的真人认证和已成年验证流程</text>
						</view>
					</view>
				</view>

				<template v-if="content_id == 2">
					<view class="fabu_tabs">
						<view class="tabs_item" v-for="(item,index) in fabuTabs" :key="index"
							@tap.stop="selectFabuTabs(item.aid)">
							<image v-if="fabu_id == item.aid" :src='STATIC_URL+"1.png"' mode="aspectFill"></image>
							<image v-else :src='STATIC_URL+"51.png"' mode="aspectFill"></image>
							<text>{{item.name}}</text>
						</view>

					</view>
					<view class="fabu_title">
						发布类型
					</view>
					<view class="fabu_type">
						<zxz-uni-data-select :placeholder="'选择发布类型'" v-model="fabu_type" :localdata="list1"
							dataKey="label" dataValue="value" @change="selectfabu"></zxz-uni-data-select>
					</view>
					<template v-if="fabu_type == 2">
						<view class="fabu_title">
							内容图片
						</view>
						<view class="images_list">
							<view class="images_list_item" v-for="(v, k) in imageData2" :key="k">
								<image :src='v' mode="aspectFill"></image>
								<image @tap.stop="deleteImg(2, k)" class="deImg" :src='STATIC_URL+"34.png"' mode="">
								</image>
							</view>
							<view class="images_list_item" @tap.stop="uploadIMG(2)" v-if="imageData2.length < 9">
								<image :src='STATIC_URL+"48.jpg"' mode="aspectFill"></image>
							</view>
						</view>
					</template>
					<template v-if="fabu_type == 3">
						<view class="fabu_title">
							内容视频
						</view>
						<view class="video_img">
							<view @tap.stop="uploadVideo(2)">
								<view class="video" v-if="videoSrc2">
									<video :src="videoSrc2"></video>
								</view>
								<view class="video_upload" v-if="!videoSrc2">
									<image :src='STATIC_URL+"75.png"' mode="aspectFill"></image>
								</view>
							</view>
							<view class="video_image" @tap.stop="uploadVideoImg(2)">
								<image v-if="!videoImg2" :src='STATIC_URL+"28.png"' mode="aspectFill"></image>
								<image class="video_image_icon" v-else :src='videoImg2' mode="aspectFill"></image>
							</view>
						</view>
					</template>

					<view class="fabu_title">
						内容标题
					</view>
					<view class="fabu_type">
						<input style="font-size: 28rpx;padding: 0 24rpx;" placeholder="请输入标题"
							placeholder-style="color: #bfbfbf;font-size:28rpx;" v-model="fabu_title" type="text"
							maxlength="30">
					</view>
					<view class="fabu_title">
						发布内容
					</view>
					<view class="html_content">
						<textarea class="html_content_text" maxlength="120" placeholder="请输入"
							placeholder-style="color: #bfbfbf;font-size:28rpx;" v-model="fabu_content"></textarea>
						<!-- <jinEdit placeholder="请输入" height="300" ref="jinEditTitle" :showImgToolbar="true" :html="fabu_content" @editOk="editContent"></jinEdit> -->
					</view>

					<template v-if="fabu_id == 4">
						<view class="fabu_title">
							商品标签
						</view>
						<view class="good_label">
							<view class="read_label" v-for="(v, k) in labels" :key="k">
								<text>{{v}}</text>
								<image @tap.stop="closeLabel(k)" :src='STATIC_URL+"112.png"' mode="aspectFill"></image>
							</view>
							<view class="add_label">

								<image :src='STATIC_URL+"113.png"' mode="aspectFill"></image>
								<input v-model="biaoqian" placeholder="请输入标签" type="text" maxlength="10"
									@confirm="addLabel">
							</view>
						</view>
					</template>

					<view class="btn">
						<view class="btn_1" @tap.stop="content_id = '0'">取消</view>
						<view class="btn_2" @tap.stop="release">确定</view>
					</view>
				</template>
			</view>

		</view>

		<!-- <view class="info">
			<view class="info_item" @tap.stop="openContent(3)">
				<view class="item_info">
					<view class="">广告</view>
					<image v-if="content_id != 3" :src='STATIC_URL+"91.png"' mode="aspectFill"></image>
					<image v-else class="open" :src='STATIC_URL+"92.png"' mode="aspectFill"></image>
				</view>
		
				<template v-if="content_id == 3">
					
				</template>
			</view>
		</view> -->

		<!--生日选择器开始 -->
		<benben-picker ref="benbenWritePickerCodepicker3" :visible.sync="pickerDiy1681180677013"
			:value.sync='usefInfo.birthday' mode='date' :picker-height='88' :current='true' :mask-show='true'
			fields='day' :timeout='true' start-year='1950-01-01' end-year='现在'>
			<template #picker-header>
				<view class='flex flex-wrap align-center justify-between myProfile1681889402_picker3_0'>
					<text @tap="$refs.benbenWritePickerCodepicker3.cancel()">取消</text>
					<text>选择生日</text>
					<text class='myProfile1681889402_picker3_0_c2'
						@tap="$refs.benbenWritePickerCodepicker3.pickerConfirm()">确定</text>
				</view>
			</template>
		</benben-picker>
		<!--生日选择器结束 -->
		
		
		<!---flex布局flex布局结束-->
		<benben-popup v-model="popupShow1686823348321" :mask="true" mode='center' :maskCloseAble="true">
			<!---会员规则flex布局开始-->
			<view class="flex flex-direction flex-wrap align-center benben-flex-layout">
				<view class='flex flex-direction flex-wrap align-center sexRegister_fd1_0'>
					<view class="flex align-center justify-between">
						<text class='sexRegister_fd1_0_c0'>协议内容</text>
						<image class='sexRegister_fd1_1 ' mode="aspectFit" :src='STATIC_URL+"67.png"'
							@tap.stop="popupShow1686823348321=false,is_tick=false"></image>
					</view>
					<scroll-view scroll-y="true" style="height: 600rpx;">
						<view>
							<jyf-parser :html="parser1 | richTextFormat" style="color: #666666;"></jyf-parser>
						</view>
					</scroll-view>
				</view>
			</view>
		</benben-popup>
	</view>
</template>
<script>
	import person from "@/components/person/index.vue"
	// import jinEdit from '@/components/jin-edit/jin-edit.vue';
	export default {
		components: {
			person
		},


		data() {
			return {
				popupShow1686823348321: false,
				pickerDiy1681180677013: false,
				usefInfo: {
					sex: "",
					nationality: "西班牙",
				},
				introduction: "", // 个人简介
				content_id: "0",
				information_id: "0",
				sex_option: [], // 性别
				sexual_orientation_option: [], // 性取向
				interest_meet_option: [], // 兴趣见面
				age_option: [], // 年龄
				height_option: [], // 身高
				weight_option: [], // 体重
				bust_option: [], // 胸围
				skin_color_option: [], // 肤色
				hair_option: [], // 头发
				eye_option: [], // 眼睛
				molt_option: [], // 脱毛
				lang_option: [], // 语言
				lang_level_option: [], // 语言水平
				week_option: [], // 星期几
				smoke_option: [], // 抽烟
				drink_option: [], // 喝酒
				nationalityList: [], // 国家列表
				nationality_option: [],  // 国籍列表
				cityList: [], // 城市列表
				lang_info: [], // 已经选择过的语言
				selectedLanguage: "", // 选择的语言
				langIndex: "", // 选择的第几项语言
				country_id: "", // 国家id
				country_name: "", // 选择的国家名字
				city_info: [], // 已选择的国家城市
				cityIndex: "", // 选择的国家城市
				city_id: "",
				city_name: "",
				areaIndex: "",
				areaList: [],
				is_biography: false, // 个人传记是否填写完
				selectedWeek: "", // 选择的时间(周几)
				time_info: [], // 已选择的工作时间
				weekIndex: "", // 时间的子项下标
				hourList: [{
						label: '01:00',
						value: '01:00'
					},
					{
						label: '02:00',
						value: '02:00'
					},
					{
						label: '03:00',
						value: '03:00'
					},
					{
						label: '04:00',
						value: '04:00'
					},
					{
						label: '05:00',
						value: '05:00'
					},
					{
						label: '06:00',
						value: '06:00'
					},
					{
						label: '07:00',
						value: '07:00'
					},
					{
						label: '08:00',
						value: '08:00'
					},
					{
						label: '09:00',
						value: '09:00'
					},
					{
						label: '10:00',
						value: '10:00'
					},
					{
						label: '11:00',
						value: '11:00'
					},
					{
						label: '12:00',
						value: '12:00'
					},
					{
						label: '13:00',
						value: '13:00'
					},
					{
						label: '14:00',
						value: '14:00'
					},
					{
						label: '15:00',
						value: '15:00'
					},
					{
						label: '16:00',
						value: '16:00'
					},
					{
						label: '17:00',
						value: '17:00'
					},
					{
						label: '18:00',
						value: '18:00'
					},
					{
						label: '19:00',
						value: '19:00'
					},
					{
						label: '20:00',
						value: '20:00'
					},
					{
						label: '21:00',
						value: '21:00'
					},
					{
						label: '22:00',
						value: '22:00'
					},
					{
						label: '23:00',
						value: '23:00'
					},
					{
						label: '24:00',
						value: '24:00'
					}
				],

				"imgNum": 9,
				"imgNum2": 9,
				"imageData": [], // 图片列表
				"videoSrc": "",
				"videoImg": "", // 视频封面

				"imageData2": [], // 发布图片列表
				"videoSrc2": "", // 发布视频
				"videoImg2": "", // 发布视频封面
				"fabu_title": "", // 发布标题
				"fabu_content": "", // 发布内容


				fabuTabs: [], // 发布分类
				fabu_id: "", // 发布类型id
				"list1": [{
						value: '2',
						label: '图文'
					},
					{
						value: '3',
						label: '视频'
					}
				],
				fabu_type: "",
				labels: [], // 商品标签
				biaoqian: "",
				dayTime: "", // 当前年月日
				time_option: [],
				cover_img_index: 0,
				cover_img: "",
				xieyi1: false,
				xieyi2: false,
				parser1: "",
				tips_status: false,
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {
			'usefInfo.user_nickname': function() {
				this.detectionPerson();
			},
			'usefInfo.birthday': function() {
				this.detectionPerson();
			}
		},
		onLoad(options) {
			this.getuser();
			this.getFindType();

			let currentDate = new Date();
			let year = currentDate.getFullYear();
			let month = currentDate.getMonth() + 1; // 月份是从 0 开始计数的，因此要加1
			let day = currentDate.getDate();
			this.dayTime = year + '-' + month + '-' + day;
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.postHide();
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			async openXieyi(aid) {
				uni.showLoading();
				let res = await this.$api.post(global.apiUrls.xieyi, {
					aid: aid
				});
				// console.log(res, 'ressssssss')
				uni.hideLoading();
				if (res.data.code != 1) {
					this.$message.info(res.data.msg)
					return
				}
				this.parser1 = res.data.data.content;
				this.popupShow1686823348321 = true;
			},
			goAd() {
				if (!this.tips_status) {
					this.$message.info('请阅读并同意协议内容');
					this.tips_status = true;
					return;
				} else {
					if (!this.xieyi1 || !this.xieyi2) {
						this.$message.info('请阅读并同意协议内容');
						return;
					}
				}
				
				uni.showLoading();
				this.$api.post(global.apiUrls.post65dda19ee5fd7, {
					
				}).then(res => {
					if (res.data.code == 1) {
						uni.hideLoading();
						this.tips_status = false;
						this.xieyi1 = false;
						this.xieyi2 = false;
						setTimeout(() => {
							uni.navigateTo({
								url: '/pages/my/advertisementManage/adSuccess'
							})
						}, 800)
					} else {
						uni.hideLoading();
						this.$message.info(res.data.msg);
					}
				})
			},
			// 开启大项
			openContent(id) {
				if (this.usefInfo.user_type == 1) {
					this.$message.info('游客账号不能修改资料和发布内容');
					return;
				}
				if (id == this.content_id) {
					this.content_id = 0;
				} else {
					this.content_id = id;
				}
			},
			// 选择资料项
			selectInformation(id) {
				if (id == this.information_id) {
					this.information_id = 0;
				} else {
					this.information_id = id;
				}
				// this.information_id = id;
			},
			// 获取配置信息  post659ce5e3a1de8
			getConfiguration() {
				this.$api.post(global.apiUrls.post659ce5e3a1de8, {

				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.sex_option = res.data.data.sex_option;
						this.sexual_orientation_option = res.data.data.sexual_orientation_option;
						this.interest_meet_option = res.data.data.interest_meet_option;
						this.age_option = res.data.data.age_option;
						this.height_option = res.data.data.height_option;
						this.weight_option = res.data.data.weight_option;
						this.bust_option = res.data.data.bust_option;
						this.skin_color_option = res.data.data.skin_color_option;
						this.hair_option = res.data.data.hair_option;
						this.eye_option = res.data.data.eye_option;
						this.molt_option = res.data.data.molt_option;
						this.lang_option = res.data.data.lang_option;
						this.lang_level_option = res.data.data.lang_level_option;
						this.week_option = res.data.data.week_option;
						this.smoke_option = res.data.data.smoke_option;
						this.drink_option = res.data.data.drink_option;
						this.time_option = res.data.data.time_option;
						this.nationality_option = res.data.data.nationality_option;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 国家列表  post64799f7bbb232
			getCountry() {
				this.$api.post(global.apiUrls.post64799f7bbb232, {

				}).then(res => {
					if (res.data.code == 1) {
						let datas = res.data.data;
						if (datas.length > 0) {
							datas.forEach((v, k) => {
								this.nationalityList.push({
									label: v.name,
									value: v.name,
									id: v.id
								})
							})
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},

			// 选择性别
			selectSex(value) {
				this.usefInfo.sex = value;
				this.detectionPerson();
			},
			// 选择性取向
			selectSexual(value) {
				this.usefInfo.sexual_orientation = value;
				this.detectionPerson();
			},
			// 选择我的兴趣见面
			selectMeet(value) {
				this.usefInfo.interest_meet = value;
				this.detectionPerson();
			},
			// 选择肤色
			selectSkinColor(e) {
				this.usefInfo.skin_color = e.value;
				this.detectionPerson();
			},
			// 选择国籍
			selectCountry(e) {
				this.usefInfo.nationality = e.label;
				this.detectionPerson();
			},
			// 选择头发
			selectHair(value) {
				this.usefInfo.hair = value;
				this.detectionPerson();
			},
			// 选择眼睛
			selectEye(value) {
				this.usefInfo.eye = value;
				this.detectionPerson();
			},
			// 选择身高
			selectHeight(e) {
				this.usefInfo.height = e.value;
				this.detectionPerson();
			},
			// 选择体重
			selectWeight(e) {
				this.usefInfo.weight = e.value;
				this.detectionPerson();
			},
			// 选择胸围
			selectBust(e) {
				this.usefInfo.bust = e.value;
				this.detectionPerson();
			},
			// 选择脱毛类型
			selectMolt(value) {
				this.usefInfo.molt = value;
				this.detectionPerson();
			},
			// 检测个人传记内容是否填写完
			detectionPerson() {
				if (this.usefInfo.sex && this.usefInfo.sexual_orientation && this.usefInfo.interest_meet && this.usefInfo.user_nickname && this.usefInfo.birthday && this.usefInfo.skin_color && this.usefInfo.nationality &&
 this.usefInfo.height && this.usefInfo.weight && this.usefInfo.bust) {
					this.is_biography = true;
				} else {
					this.is_biography = false;
				}
			},
			//获取信息
			async getuser() {
				let id1 = uni.getStorageSync("USER_INFO");
				this.userid = id1.id
				let res = await this.$api.post(global.apiUrls.userinfo, {
					user_id: this.userid,
				});
				if (res.data.code != 1) {
					this.$message.info(res.data.msg)
					return
				}
				console.log(res);
				this.usefInfo = res.data.data;
				this.lang_info = res.data.data.lang_info;
				this.city_info = res.data.data.city_info;
				this.time_info = res.data.data.time_info;
				if (this.city_info.length > 0) {
					this.city_info.forEach((v, k) => {
						if (v.cityList.length > 0) {
							v.cityList.forEach((v1, k1) => {
								v1.label = v1.name
								v1.value = v1.name
							})
						}
						if (v.areaList.length > 0) {
							v.areaList.forEach((v2, k2) => {
								v2.label = v2.name
								v2.value = v2.name
							})
						}
					})
				}
				this.imageData = res.data.data.images;
				if (this.imageData.length > 0) {
					this.imageData.forEach((v, k) => {
						if (v == res.data.data.cover_img) {
							this.cover_img_index = k;
						}
					})
				}
				this.videoSrc = res.data.data.personal_video;
				this.videoImg = res.data.data.personal_video_img;
				this.introduction = res.data.data.monologue;
				this.detectionPerson();
				this.getConfiguration();
				this.getCountry();
				// console.log(this.usefInfo, 'this.usefInfo')
			},
			// 保存个人传记
			saveBiography() {
				if (!this.is_biography) {
					this.$message.info('请完善个人传记内容');
					return;
				}
				this.$api.post(global.apiUrls.post659cf60be20d0, {
					sex: this.usefInfo.sex,
					sexual_orientation: this.usefInfo.sexual_orientation,
					interest_meet: this.usefInfo.interest_meet,
					user_nickname: this.usefInfo.user_nickname,
					birthday: this.usefInfo.birthday,
					skin_color: this.usefInfo.skin_color,
					nationality: this.usefInfo.nationality,
					hair: this.usefInfo.hair,
					eye: this.usefInfo.eye,
					height: this.usefInfo.height,
					weight: this.usefInfo.weight,
					bust: this.usefInfo.bust,
					molt: this.usefInfo.molt
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},

			// 富文本內容
			editOk(e) {
				// console.log(e);
				this.introduction = e.html;
				// this.prodData.content = e.html;
			},
			// 选择抽烟
			selectSmoke(value) {
				this.usefInfo.smoke = value;
			},
			// 选择喝酒
			selectDrink(value) {
				this.usefInfo.drink = value;
			},
			// 设置个人简介  post659cfec6e14d9
			saveIntroduction() {
				if (!this.introduction) {
					this.$message.info('请输入我的独白');
					return;
				}
				if (!this.introduction.length) {
					this.$message.info('我的独白内容不能少于24个字');
					return;
				}
				
				if (!this.usefInfo.smoke) {
					this.$message.info('请完善抽烟内容');
					return;
				}
				if (!this.usefInfo.drink) {
					this.$message.info('请完善喝酒内容');
					return;
				}
				this.$api.post(global.apiUrls.post659cfec6e14d9, {
					monologue: this.introduction,
					smoke: this.usefInfo.smoke,
					drink: this.usefInfo.drink
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},

			// 选择语言
			selectLang(e) {
				this.selectedLanguage = e.value;
			},
			// 选择语言水平
			selectLangLevel(e) {
				this.lang_info[this.langIndex].level = e.value;
			},
			addLang() {
				if (!this.selectedLanguage) {
					this.$message.info('请选择语言');
					return;
				}
				if (this.lang_info.length > 0) {
					let index = -1;
					this.lang_info.forEach((v, k) => {
						if (v.lang == this.selectedLanguage) {
							index = k;
						}
					})
					if (index == -1) {
						this.lang_info.push({
							id: "",
							lang: this.selectedLanguage,
							level: ""
						})
						this.selectedLanguage = "";
					} else {
						this.$message.info('已添加过该语言');
						return;
					}
				} else {
					this.lang_info.push({
						id: "",
						lang: this.selectedLanguage,
						level: ""
					})
					this.selectedLanguage = "";
				}
				this.$forceUpdate();
			},
			// 删除语言
			closeLang(index) {
				this.lang_info.splice(index, 1);
			},
			selectLangIndex(index) {
				this.langIndex = index;
			},
			// 提交语言
			saveLang() {
				if (this.lang_info.length == 0) {
					this.$message.info('请添加语言');
					return;
				}
				let index = -1;
				if (this.lang_info.length > 0) {
					this.lang_info.forEach((v, k) => {
						if (!v.lang || !v.level) {
							index = k;
						}
					})
				}
				if (index != -1) {
					this.$message.info('请完善语言内容');
					return;
				}
				this.$api.post(global.apiUrls.post659cff0c51a32, {
					lang_info: JSON.stringify(this.lang_info)
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},
			// 选择工作城市（国家）
			workCountry(e) {
				// console.log(e);
				this.country_name = e.label;
				this.nationalityList.forEach((v, k) => {
					if (v.value == e.value) {
						this.country_id = v.id
					}
				})

			},
			addCountry() {
				if (!this.country_name) {
					this.$message.info('请选择国家');
					return;
				}
				if (this.city_info.length > 0) {
					let index = -1;
					this.city_info.forEach((v, k) => {
						if (v.country == this.country_name) {
							index = k;
						}
					})
					if (index == -1) {
						this.city_info.push({
							id: "",
							country: this.country_name,
							city: "",
							cityList: [],
							area: "",
							areaList: []
						})
						this.country_name = "";
					} else {
						this.$message.info('已添加过该语言');
						return;
					}
				} else {
					this.city_info.push({
						id: "",
						country: this.country_name,
						city: "",
						cityList: [],
						area: "",
						areaList: []
					})
					this.country_name = "";
				}
				this.$forceUpdate();
				this.getCityList();
			},
			// 城市列表
			getCityList() {
				this.cityList = [];
				this.$api.post(global.apiUrls.post64799f8956050, {
					country_id: this.country_id
				}).then(res => {
					console.log(res);
					if (res.data.code == 1) {
						let datas = res.data.data;
						if (datas.length > 0) {
							datas.forEach((v, k) => {
								this.cityList.push({
									label: v.name,
									value: v.name,
									id: v.id
								})
							})
							this.city_info[this.city_info.length - 1].cityList = this.cityList;
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 获取区域列表  post64799f97bd2e9
			getAreaList() {
				this.areaList = [];
				this.$api.post(global.apiUrls.post64799f97bd2e9, {
					city_id: this.city_id
				}).then(res => {
					console.log(res);
					if (res.data.code == 1) {
						let datas = res.data.data;
						if (datas.length > 0) {
							datas.forEach((v, k) => {
								this.areaList.push({
									label: v.name,
									value: v.name,
									id: v.id
								})
							})
							this.city_info[this.city_info.length - 1].areaList = this.areaList;
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			workCity(e) {
				this.city_info[this.cityIndex].city = e.value;
				if (this.city_info[this.cityIndex].cityList.length > 0) {
					this.city_info[this.cityIndex].cityList.forEach((v, k) => {
						if (v.value == e.value) {
							this.city_id = v.id;
						}
					})
					this.getAreaList();
				}
			},
			workArea(e) {
				this.city_info[this.cityIndex].area = e.value;
			},

			// 删除国家
			closeCity(index) {
				this.city_info.splice(index, 1);
			},
			selectCityIndex(index) {
				this.cityIndex = index;
			},
			selectAreaIndex(index) {
				this.areaIndex = index;
			},
			// 提交国家城市
			saveCity() {
				if (this.city_info.length == 0) {
					this.$message.info('请添加国家');
					return;
				}
				let index = -1;
				if (this.city_info.length > 0) {
					this.city_info.forEach((v, k) => {
						if (!v.country || !v.city) {
							index = k;
						}
					})
				}
				if (index != -1) {
					this.$message.info('请完善城市内容');
					return;
				}
				// console.log(this.city_info);
				this.$api.post(global.apiUrls.post659d01a7f10ff, {
					work_city_info: JSON.stringify(this.city_info)
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},
			// 选择的时间周几
			selectTime(e) {
				this.selectedWeek = e.value;
			},
			// 选择时间类型
			selectTimeType(value) {
				this.usefInfo.time_info_type = value;
			},
			// 添加时间
			addWeek() {
				if (!this.selectedWeek) {
					this.$message.info('请选择时间');
					return;
				}
				if (this.time_info.length > 0) {
					let index = -1;
					this.time_info.forEach((v, k) => {
						if (v.week == this.selectedWeek) {
							index = k;
						}
					})
					if (index == -1) {
						this.time_info.push({
							id: "",
							week: this.selectedWeek,
							start_time: "",
							end_time: ""
						})
						this.selectedWeek = "";
					} else {
						this.$message.info('已添加过该时间');
						return;
					}
				} else {
					this.time_info.push({
						id: "",
						week: this.selectedWeek,
						start_time: "",
						end_time: ""
					})
					this.selectedWeek = "";
				}
				this.$forceUpdate();
			},
			// 选择选中的时间子项
			selectWeekIndex(index) {
				this.weekIndex = index;
			},
			// 选择周下的开始时间
			selectStartTime(e) {
				this.time_info[this.weekIndex].start_time = e.value;
			},
			// 选择周下的结束时间
			selectEndTime(e) {
				this.time_info[this.weekIndex].end_time = e.value;
			},
			// 删除时间
			closeWeek(index) {
				this.time_info.splice(index, 1);
				this.$forceUpdate();
			},
			// 保存时间
			saveWeek() {
				if (this.usefInfo.time_info_type == 0) {
					this.$message.info('请选择时间类型');
					return;
				}
				if (this.usefInfo.time_info_type == 2) {
					let is_submit = false;
					if (this.time_info.length > 0) {
						let data = this.time_info;
						for (var i = 0; i < data.length; i++) {
							if (!data[i].start_time || !data[i].end_time) {
								this.$message.info('请完善' + data[i].week + '的时间');
								is_submit = true;
								break;
							}
							// else {
							// 	if (new Date(this.dayTime + ' ' + data[i].start_time + ':00').getTime() >= new Date(this
							// 			.dayTime + ' ' + data[i].end_time + ':00').getTime()) {
							// 		this.$message.info(data[i].week + '的开始时间大于结束时间，请修改');
							// 		is_submit = true;
							// 		break;
							// 	}
							// }
					
						}
					} else {
						this.$message.info('请选择时间');
						return;
					}
					if (is_submit) return;
				}
				this.$api.post(global.apiUrls.post659d02255668c, {
					type: this.usefInfo.time_info_type,
					time_info: this.usefInfo.time_info_type == 1 ? "" : JSON.stringify(this.time_info)
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},

			// 设置联系
			saveLianxi() {
				if (!this.usefInfo.whatsapp) {
					this.$message.info('请输入whatsapp');
					return;
				}
				if (!this.usefInfo.wx) {
					this.$message.info('请输入微信号');
					return;
				}
				this.$api.post(global.apiUrls.post659d08cfa820f, {
					mobile: this.usefInfo.mobile,
					wx: this.usefInfo.wx,
					whatsapp: this.usefInfo.whatsapp
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},
			// 上传图片
			uploadIMG(type) {
				let self = this
				// 从相册中选择图片
				uni.chooseImage({
					count: type == 1 ? self.imgNum : self.imgNum2, //默认9
					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
					sourceType: ['camera', 'album'], //从相册选择

					success: function(res) {
						const tempFilePaths = res.tempFilePaths;
						// console.log(tempFilePaths)
						for (let i = 0; i < tempFilePaths.length; i++) {
							uni.uploadFile({
								url: global.API_BASE_URL + global.API_VERSION +
									'/6438a7602dbc6', //仅为示例，非真实的接口地址
								filePath: tempFilePaths[i],
								name: 'file[]',
								formData: {
									dir: 'images'
								},
								success: (uploadFileRes) => {
									// console.log(uploadFileRes)
									if (type == 1) {
										self.imageData.push(JSON.parse(uploadFileRes.data).data[0]
											.path)
										self.imgNum = 9 - self.imageData.length;
									} else if (type == 2) {
										self.imageData2.push(JSON.parse(uploadFileRes.data).data[0]
											.path)
										self.imgNum2 = 9 - self.imageData.length;
									}
								},
								fail: function(err) {
									console.log(err)
								}
							});
						}

					}
				});
			},
			// 删除图片
			deleteImg(type, index) {
				if (type == 1) {
					this.imageData.splice(index, 1);
					this.$message.info('删除成功');
					this.imgNum = 9 - this.imageData.length;
					this.cover_img_index = 0;
				} else if (type == 2) {
					this.imageData2.splice(index, 1);
					this.$message.info('删除成功');
					this.imgNum2 = 9 - this.imageData2.length;
				}

			},
			// 设置相册  post659d133225525
			saveImages() {
				if (this.imageData.length == 0) {
					this.$message.info('请上传图片');
					return;
				}
				if (this.imageData.length < 3) {
					this.$message.info('图库最少上传3张图片');
					return;
				}
				if (!this.cover_img) {
					this.$message.info('请设置主图');
					return;
				}
				this.$api.post(global.apiUrls.post659d133225525, {
					photo_info: this.imageData.join(','),
					cover_img: this.cover_img
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},
			// 选择相册封面图
			selectCover(index) {
				this.cover_img_index = index;
			},
			saveCoverImg(img) {
				this.cover_img = img;
				// console.log(this.cover_img);
				this.$message.info('已设置');
			},
			// 上传视频
			uploadVideo(type) {
				let self = this
				uni.chooseVideo({
					sourceType: ['camera', 'album'],
					success: function(res) {
						console.log(res);
						const tempFilePaths = res.tempFilePath;
						// console.log(tempFilePaths)
						uni.uploadFile({
							url: global.API_BASE_URL + global.API_VERSION +
							'/6438a7602dbc6', //仅为示例，非真实的接口地址
							filePath: tempFilePaths,
							name: 'file[]',
							formData: {
								dir: 'videos'
							},
							success: (uploadFileRes) => {
								// console.log(uploadFileRes)
								if (type == 1) {
									self.videoSrc = JSON.parse(uploadFileRes.data).data[0].path;
								} else if (type == 2) {
									self.videoSrc2 = JSON.parse(uploadFileRes.data).data[0].path;
								}

							},
							fail: function(err) {
								console.log(err)
							}
						});
					},
				});
			},
			// 上传视频封面
			uploadVideoImg(type) {
				let self = this
				// 从相册中选择图片
				uni.chooseImage({
					count: 1,
					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
					sourceType: ['camera', 'album'], //从相册选择

					success: function(res) {
						const tempFilePaths = res.tempFilePaths;
						// console.log(tempFilePaths)
						for (let i = 0; i < tempFilePaths.length; i++) {
							uni.uploadFile({
								url: global.API_BASE_URL + global.API_VERSION +
								'/6438a7602dbc6', //仅为示例，非真实的接口地址
								filePath: tempFilePaths[i],
								name: 'file[]',
								formData: {
									dir: 'images'
								},
								success: (uploadFileRes) => {
									// console.log(uploadFileRes)
									if (type == 1) {
										self.videoImg = JSON.parse(uploadFileRes.data).data[0]
										.path;
									} else if (type == 2) {
										self.videoImg2 = JSON.parse(uploadFileRes.data).data[0]
											.path;
									}

								},
								fail: function(err) {
									console.log(err)
								}
							});
						}
					}
				});
			},
			// 设置视频 post659d18ee2fd63
			saveVideo() {
				if (!this.videoSrc) {
					this.$message.info('请上传视频');
					return;
				}
				if (!this.videoImg) {
					this.$message.info('请上传视频封面');
					return;
				}
				this.$api.post(global.apiUrls.post659d18ee2fd63, {
					personal_video: this.videoSrc,
					personal_video_img: this.videoImg
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.getuser();
					}
				})
			},


			// 是否隐藏三方  post64fabe4eafefc
			postHide() {
				this.$api.post(global.apiUrls.post64fabe4eafefc, {

				}).then(res => {
					// console.log(res);
					if (res.data.code == 1) {
						this.is_hide = res.data.data.is_hide;
					}
				})
			},
			
			// 获取发布分类
			getFindType() {
				this.$api.post(global.API_VERSION + '/647321a4177dc', {
					from: 'other'
				}).then(res => {
					if (res.data.code == 1) {
						this.fabuTabs = res.data.data;
						if (this.fabuTabs.length > 0) {
							this.fabu_id = this.fabuTabs[0].aid;
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			// 选择发布分类
			selectFabuTabs(aid) {
				this.fabu_id = aid;
			},
			selectfabu(e) {
				this.fabu_type = e.value;
			},
			editContent(e) {
				this.fabu_content = e.html;
			},

			// 商品增加标签
			addLabel() {
				if (!this.biaoqian) {
					this.$message.info('请输入标签内容');
					return;
				}
				let num = -1;
				num = this.labels.indexOf(this.biaoqian);
				console.log(num);
				if (num == -1) {
					this.labels.push(this.biaoqian);
					this.biaoqian = "";
				} else {
					this.$message.info('已存在相同标签');
					return;
				}
			},
			closeLabel(index) {
				this.labels.splice(index, 1);
			},

			// 发布动态
			release() {
				if (!this.fabu_type) {
					this.$message.info('请选择发布的内容类型');
					return;
				}
				if (!this.fabu_title) {
					this.$message.info('请输入标题');
					return;
				}
				if (!this.fabu_content) {
					this.$message.info('请输入内容');
					return;
				}
				if (this.type == 2) {
					if (this.imageData2.length == 0) {
						this.$message.info('请上传动态图片');
						return;
					}
				}
				if (this.type == 3) {
					if (!this.videoSrc2) {
						this.$message.info('请上传动态视频');
						return;
					}
					if (!this.videoImg2) {
						this.$message.info('请上传动态视频封面');
						return;
					}
				}
				// if (this.type == 4) {
				// 	if (this.labels.length == 0) {
				// 		this.$message.info('请添加商品标签');
				// 		return;
				// 	}
				// }
				this.$api.post(global.API_VERSION + '/647321c032a90', {
					type: this.fabu_type,
					cate_id: this.fabu_id,
					title: this.fabu_title,
					images: this.imageData2.length > 0 ? this.imageData2.join(',') : "",
					video: this.videoSrc2,
					video_image: this.videoImg2,
					content: this.fabu_content,
					labels: this.labels.length > 0 ? this.labels.join(',') : ""
				}).then(res => {
					this.$message.info(res.data.msg);
					if (res.data.code == 1) {
						this.content_id = 0;
						this.fabu_title = "";
						this.imageData2 = [];
						this.videoSrc2 = "";
						this.videoImg2 = "";
						this.fabu_content = "";
						this.labels = [];
					}
				})

			},








			async getsetpay() {
				let res = await this.$api.post(global.apiUrls.a6483dd30d089c, {})
				if (res.data.code != 1) {
					this.$message.info(res.data.msg)
					return
				}
				if (res.data.data.is_set == 0) {
					this.$message.info('您还没有设置支付密码');
					setTimeout(() => {
						this.$urouter.navigateTo('/pages/xtsz/setpay/setpay')
					}, 800)
				} else {
					this.$urouter.navigateTo('/pages/xtsz/payChange/payChange')
				}
			},
			async getzhuxiao() {
				let res = await this.$api.post(global.apiUrls.a64367eab91916, {})
				if (res.data.code != 1) {
					this.$message.info(res.data.msg)
					return
				}
				if (res.data.data.status == -1) {
					setTimeout(() => {
						this.$urouter.navigateTo('/pages/xtsz/accountCancellation/accountCancellation')
					}, 500)
				} else if (res.data.data.status == 0) {
					this.$urouter.navigateTo(
						`/pages/xtsz/accountCancellationSubmission/accountCancellationSubmission?type=2`)
				} else if (res.data.data.status == 1) {
					this.$store.commit('logout')
					this.toLoginDiy();
				}
			},
		}
	};
</script>
<style lang="scss" scoped>
	.xieyi_info {
		display: flex;
		// align-items: center;
		margin-top: 24rpx;
		image {
			width: 36rpx;
			height: 36rpx;
			margin-right: 8rpx;
		}
	}
	.image_tips {
		font-size: 26rpx;
		color: #8B060D;
		margin-top: 12rpx;
	}
	.image_tips_item {
		font-size: 24rpx;
		margin-top: 8rpx;
		line-height: 32rpx;
	}
	.images_list {
		overflow: hidden;
		margin-top: 32rpx;

		.images_list_item {
			float: left;
			margin: 0 16rpx 16rpx 0;
			width: 200rpx;
			// height: 200rpx;
			position: relative;
			.images_item_tips {
				text-align: center;
				font-size: 22rpx;
				color: #fff;
				background: #6A0002;
				width: 160rpx;
				height: 38rpx;
				line-height: 38rpx;
				margin: 16rpx auto 0;
				border-radius: 8rpx;
			}
			image {
				width: 200rpx;
				height: 200rpx;
				border-radius: 8rpx;
			}

			.deImg {
				width: 32rpx;
				height: 32rpx;
				position: absolute;
				top: 8rpx;
				right: 8rpx;
			}
		}

		.images_list_item:nth-child(3n+3) {
			margin-right: 0;
		}
	}
	.cover_active {
		// border: 2px solid #6A0002;
		border: 2px solid #8B060D;
		border-radius: 10rpx;
	}

	.video_img {
		display: flex;
		margin-top: 32rpx;

		.video {
			width: 210rpx;
			height: 210rpx;
			margin-bottom: 16px;
			margin-right: 16rpx;

			video {
				width: 100%;
				height: 100%;
			}
		}

		.video_image {
			width: 210rpx;
			height: 232rpx;
			margin-bottom: 16px;

			// .video_image_icon {
			// 	width: 180rpx;
			// 	height: 180rpx;
			// }
			image {
				width: 100%;
				height: 100%;
				border-radius: 8rpx;
			}
		}

		.video_upload {
			width: 180rpx;
			height: 180rpx;
			margin-bottom: 16px;
			margin-right: 16rpx;

			image {
				width: 100%;
				height: 100%;
				border-radius: 8rpx;
			}
		}
	}









	.fabu_tabs {
		display: flex;
		justify-content: space-between;
		padding: 0 48rpx;
		margin-top: 34rpx;

		.tabs_item {
			display: flex;
			align-items: center;
			font-size: 28rpx;
			color: #333;

			image {
				width: 36rpx;
				height: 36rpx;
				margin-right: 15rpx;
			}
		}
	}

	.fabu_title {
		color: #8B060D;
		font-size: 28rpx;
		margin: 40rpx 0 32rpx 0;
	}

	.fabu_img {
		image {
			width: 220rpx;
			height: 220rpx;
		}
	}

	.fabu_type {
		width: 686rpx;
		height: 64rpx;
		background: #F8F8F8;
		border-radius: 8rpx;
		// padding: 0 24rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-size: 26rpx;
	}

	.html_content {
		background: #f8f8f8;
		padding: 0rpx 24rpx 32rpx;
		border-radius: 16rpx;
		margin-bottom: 24rpx;

		.html_content_text {
			padding: 24rpx 0 0;
			font-size: 28rpx;
			height: 150rpx;
		}
	}

	.good_label {
		overflow: hidden;

		.read_label {
			float: left;
			padding: 14rpx 40rpx;
			display: flex;
			align-items: center;
			font-size: 28rpx;
			background: #FFFFFF;
			border-radius: 34rpx;
			border: 2rpx solid #BFBFBF;
			margin-right: 32rpx;
			margin-bottom: 24rpx;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-left: 20rpx;
			}
		}

		.add_label {
			float: left;
			padding: 14rpx 40rpx;
			display: flex;
			align-items: center;
			font-size: 28rpx;
			background: #FFFFFF;
			border-radius: 34rpx;
			border: 2rpx solid #BFBFBF;

			image {
				width: 32rpx;
				height: 32rpx;
				margin-right: 20rpx;
			}

			input {
				width: 140rpx;
				height: 40rpx;
				font-size: 28rpx;
			}
		}
	}

	.info {
		padding: 0 32rpx;

		.info_item {
			.item_info {
				font-size: 32rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 32rpx 0;
				border-bottom: 1px solid #eee;

				image {
					width: 32rpx;
					height: 32rpx;
				}

				.open {
					width: 32rpx;
					height: 3rpx;
				}
			}

			.informationInfo {
				.informationInfo_item {
					padding: 32rpx 0;
					font-size: 28rpx;
					color: #666666;
					display: flex;
					justify-content: space-between;
					align-items: center;
					border-bottom: 1px solid #eee;

					image {
						width: 36rpx;
						height: 36rpx;
					}
				}
			}

		}
	}

	.btn {
		display: flex;
		justify-content: space-between;
		padding: 32rpx 0;
		border-bottom: 1px solid #eee;

		.btn_1 {
			width: 310rpx;
			height: 72rpx;
			line-height: 72rpx;
			text-align: center;
			background: #EEEEEE;
			border-radius: 12rpx;
			font-size: 28rpx;
			color: #666;
		}

		.btn_2 {
			width: 310rpx;
			height: 72rpx;
			line-height: 72rpx;
			text-align: center;
			background: #6A0002;
			border-radius: 12rpx;
			font-size: 28rpx;
			color: #fff;
		}
	}

	.language_info {
		display: flex;
		align-items: center;
		justify-content: space-between;

		.language_select {
			width: 508rpx;
			height: 64rpx;
			border-radius: 8rpx;
			border: 1px solid #BFBFBF;
			display: flex;
			align-items: center;
			padding: 0 12rpx;

			input {
				flex: 1;
			}
		}

		.language_add {
			width: 140rpx;
			height: 64rpx;
			background: #8B060D;
			border-radius: 8rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			color: #fff;
			font-size: 28rpx;
		}
	}
	.jiben_item_1 {
		padding: 32rpx 0 0 0;
		border-bottom: 1px solid #eee;
		display: flex;
	
		.jiben_item_1_le {
			width: 208rpx;
		}
	
		.jiben_item_1_ri {
			width: calc(100% - 208rpx);
			overflow: hidden;
	
			.jiben_item_select {
				float: left;
				display: flex;
				align-items: center;
				margin-right: 50rpx;
				width: 35%;
				margin-bottom: 32rpx;
	
				image {
					width: 36rpx;
					height: 36rpx;
					margin-right: 15rpx;
				}
			}
		}
	}

	.language_list {
		background: #f8f8f8;
		border-radius: 16rpx;
		padding: 0 24rpx;

		.language_item {
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 100%;
			padding: 44rpx 0;
			margin-top: 24rpx;
			border-bottom: 1px solid #bfbfbf;

			.language_item_1 {
				font-size: 28rpx;
				color: #666;
				width: 160rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 1;
				-webkit-box-orient: vertical;
			}

			.language_item_2 {
				width: 270rpx;
				height: 64rpx;
				background: #FFFFFF;
				border-radius: 8rpx;
				display: flex;
				font-size: 26rpx;
				align-items: center;
				justify-content: space-between;
				// padding: 0 20rpx;
			}

			.language_item_3 {
				image {
					width: 36rpx;
					height: 36rpx;
				}
			}

			.language_item_4 {
				width: 173rpx;
				height: 64rpx;
				background: #FFFFFF;
				border-radius: 8rpx;
				display: flex;
				font-size: 26rpx;
				align-items: center;
				justify-content: space-between;
				// padding: 0 20rpx;
			}

			.language_item_5 {
				width: 200rpx;
				height: 64rpx;
				background: #FFFFFF;
				border-radius: 8rpx;
				display: flex;
				font-size: 26rpx;
				align-items: center;
				justify-content: space-between;
			}
		}
	}

	.lianxi {
		width: 686rpx;
		background: #F8F8F8;
		border-radius: 16rpx;
		padding: 15rpx 30rpx;
		margin-top: 32rpx;

		.lianxi_item {
			padding: 15rpx 0;
			display: flex;
			align-items: center;

			.lianxi_item_1 {
				font-size: 28rpx;
				width: 138rpx;
			}

			.lianxi_item_2 {
				width: 480rpx;
				height: 64rpx;
				background: #FFFFFF;
				border-radius: 8rpx;

				input {
					width: 100%;
					height: 100%;
					font-size: 28rpx;
					padding: 0 24rpx;
				}
			}
		}
	}

	.jiben_title {
		font-size: 28rpx;
		color: #8B060D;
		padding: 32rpx 0 0 0;
	}

	.jiben_item_4 {
		padding: 32rpx 0 0 0;
		border-bottom: 1px solid #eee;
		display: flex;

		.jiben_item_4_le {
			width: 208rpx;
		}

		.jiben_item_4_ri {
			width: calc(100% - 208rpx);
			overflow: hidden;

			.jiben_item_select {
				float: left;
				display: flex;
				align-items: center;
				margin-right: 60rpx;
				// width: 15%;
				margin-bottom: 32rpx;

				image {
					width: 36rpx;
					height: 36rpx;
					margin-right: 15rpx;
				}
			}
		}
	}

	.jiben {
		.jiben_item_1 {
			padding: 32rpx 0 0 0;
			border-bottom: 1px solid #eee;
			display: flex;

			.jiben_item_1_le {
				width: 208rpx;
			}

			.jiben_item_1_ri {
				width: calc(100% - 208rpx);
				overflow: hidden;

				.jiben_item_select {
					float: left;
					display: flex;
					align-items: center;
					margin-right: 50rpx;
					width: 35%;
					margin-bottom: 32rpx;

					image {
						width: 36rpx;
						height: 36rpx;
						margin-right: 15rpx;
					}
				}
			}
		}

		.jiben_item_2 {
			padding: 32rpx 0;
			border-bottom: 1px solid #eee;
			display: flex;
			align-items: center;

			.jiben_item_2_le {
				width: 208rpx;
			}

			.jiben_item_2_ri {
				padding: 0 10rpx;
				display: flex;
				align-items: center;
				width: 478rpx;
				height: 64rpx;
				background: #F8F8F8;
				border-radius: 8rpx;

				input {
					flex: 1;
					font-size: 28rpx;
				}
			}
		}

		.jiben_item_3 {
			padding: 32rpx 0;
			border-bottom: 1px solid #eee;
			display: flex;
			align-items: center;

			.jiben_item_3_le {
				width: 208rpx;
			}

			.jiben_item_3_ri {
				flex: 1;
				display: flex;
				justify-content: space-between;

				.jiben_item_3_ri_1 {
					display: flex;
					align-items: center;
					justify-content: space-between;
					width: 200rpx;
					height: 64rpx;
					background: #F8F8F8;
					border-radius: 8rpx;
					font-size: 26rpx;
					color: #BFBFBF;
					padding: 0 10rpx;
				}

				.jiben_item_3_ri_2 {
					display: flex;
					align-items: center;
					justify-content: space-between;
					width: 200rpx;
					height: 64rpx;
					background: #F8F8F8;
					border-radius: 8rpx;
					font-size: 26rpx;
					color: #BFBFBF;
					padding: 0 10rpx;
				}
			}
		}
	}


	.home_img {
		width: 40rpx;
		height: 40rpx;
	}

	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #fff;
		background-size: 100% auto !important;
	}

	.cardAndSafe_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.cardAndSafe_fd0_0_c2 {
		width: 40rpx;
		height: 40rpx;
	}

	.cardAndSafe_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.cardAndSafe_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
		line-height: 88rpx;
	}

	.cardAndSafe_fd0_0 {
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.cardAndSafe_flex_1 {
		background: #fff;
		font-size: 32rpx;
		background-size: 100% auto !important;
		padding: 0rpx 32rpx 0rpx 32rpx;
	}

	.cardAndSafe_fd1_3 {
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.cardAndSafe_fd1_0_c1 {
		font-size: 26rpx;
		color: rgba(191, 191, 191, 1);
		font-weight: 400;
	}

	.cardAndSafe_fd1_0_c0 {
		font-size: 32rpx;
		font-weight: 400;
		color: #333333;
	}

	.cardAndSafe_fd1_0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 32rpx 0rpx;
	}

	.cardAndSafe_flex_2 {
		height: 88rpx;
		position: fixed;
		bottom: 64rpx;
		left: 30rpx;
	}

	.cardAndSafe_fd2_0 {
		background: #6A0002;
		border-radius: 44rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #fff;
		width: 690rpx;
		height: 88rpx;
		line-height: 88rpx;
	}


	.myProfile1681889402_picker3_0_c2 {
		color: #000000;
	}

	.myProfile1681889402_picker3_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
		border-radius: 25rpx 25rpx 0rpx 0rpx;
		background-size: 100% auto !important;
	}
	
	
	.sexRegister_fd1_0_c1 {
		font-size: 28rpx;
		font-weight: 400;
		color: #333;
		line-height: 48rpx;
	}
	
	.sexRegister_fd1_0_c0 {
		font-size: 34rpx;
		font-weight: 500;
		color: #333;
		margin: 0rpx 0rpx 16rpx 0rpx;
	}
	
	.sexRegister_fd1_0 {
		background: #fff;
		width: 580rpx;
		border-radius: 24rpx 24rpx 24rpx 24rpx;
		background-size: 100% auto !important;
		padding: 28rpx 32rpx 32rpx 32rpx;
	}
	.sexRegister_fd1_1 {
		width: 55rpx;
		height: 55rpx;
		border-radius: 55rpx 55rpx 55rpx 55rpx;
		position: absolute;
		right: 32rpx;
		top: 20rpx;
	}
</style>